<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="sg.edu.nus.dbd.util.Constants"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<div align="left">
<table width="800" cellspacing="0" cellpadding="0" border="0">
	<tbody>
		<tr>
			<td valign="top" style="padding: 0px; width: 100%;">
			<div class="box_region left">
			<div class="box">
			<div class="top">
			<div class="left">
			<div class="right">
			<div class="middle">
			<div class="box_title"><span class="boxtitle">Second-Level
			Details</span></div>
			</div>
			</div>
			</div>
			</div>
			<div class="content" align="left">
			<form>
			<table width="100%" class="formlabel">
				<tr>
					<td>Metric Name:</td>
					<td><%=Constants.DASHBOARD_PARAMS_METRIC.get((String) session
							.getAttribute("CurrentParameter"))%></td>
				</tr>
				<tr>
					<td>Start Date:</td>
					<td>${startDate}</td>
				</tr>
				<tr>
					<td>End Date:</td>
					<td>${endDate}</td>
				</tr>
			</table>
			<br />
			<table width="100%">
				<thead>
					<th align="left" nowrap>No.</th>
					<th align="left" nowrap>Date Range</th>
					<th align="left" nowrap>Avarage Value</th>
				</thead>
				<c:forEach var="level2Data" items="${level2DataList}"
					varStatus="status">
					<tr class="cellstatus">
						<td align="left" class="nobright normaltext" width="5">${status.index
						+ 1}</td>
						<td align="left" class="nobright normaltext"><a
							href="ThirdLevelBreakdown.do?pIndex=${status.index}">${level2Data.timeBlockName}</a></td>
						<td align="left"
							class="${(level2Data.aggregatedValue==-1)?'nobright normaltext': ((!inverse && level2Data.aggregatedValue < warningLevel) || (inverse && level2Data.aggregatedValue > criticalLevel))?'bright healthy':(((!inverse && level2Data.aggregatedValue >= criticalLevel) || (inverse && level2Data.aggregatedValue <= warningLevel))?'bright critical':'bright warning')}">${(level2Data.aggregatedValue<0)?'N/A':level2Data.aggregatedValue}</td>
					</tr>
				</c:forEach>
			</table>
			<a href="Dashboard.do">Back</a></form>
			</form>
			</div>
			<div class="bottom">
			<div class="left">
			<div class="right">
			<div class="middle"></div>
			</div>
			</div>
			</div>
			</div>
			</div>
			</td>
		</tr>
	</tbody>
</table>
</div>
</body>
</html>